package models

type ShoppingCart struct {
	ID        string `json:"id" gorm:"column:id;primaryKey;type:int;size:64;comment:主键"`
	Openid    string `json:"openid" gorm:"column:openid;type:varchar(50);comment:openid"`
	RobotName string `json:"robot_name" gorm:"column:robot_name;type:varchar(50);comment:机器名称"`
	GoodsID   string `json:"goods_id" gorm:"column:goods_id;type:varchar(30);comment:商品id"`
	Count     int    `json:"count" gorm:"column:count;type:int;size:64;comment:数量"`
	CreatedAt int64  `json:"created_at" gorm:"column:created_at;type:int;size:64;comment:创建时间"`
}

func (ShoppingCart) TableName() string {
	return "shopping_cart"
}

// 模式自动注册
func init() {
	Models = append(Models, &ShoppingCart{})
}
